﻿#region Using Statements
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
using Microsoft.Xna.Framework.Content.Pipeline.Processors;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using MilwormsGameData;
#endregion

namespace MilwormsGameContentPipeline
{
    [ContentTypeWriter]
    public class QuestWriter : MilwormsGameWriter<Quest>
    {
        protected override void Write(ContentWriter output, Quest value)
        {
            output.Write(value.Name);
            output.Write(value.Description);
            output.Write(value.ObjectiveMessage);
            output.Write(value.CompletionMessage);
            output.WriteObject(value.GearRequirements);
            output.Write(value.DestinationMapContentName);
            output.Write(value.DestinationNpcContentName);
            output.Write(value.DestinationObjectiveMessage);
            output.Write(value.ExperienceReward);
        }
        
        public override string GetRuntimeType(TargetPlatform targetPlatform)
        {
            return typeof(MilwormsGameData.Quest).AssemblyQualifiedName;
        }

        public override string GetRuntimeReader(TargetPlatform targetPlatform)
        {
            return typeof(MilwormsGameData.Quest.QuestReader).AssemblyQualifiedName;
        }
        
    }
}
